// 类组件
import React from 'react'
class PlantInfo2 extends React.Component {
    constructor(props) {
        super(props)
    }
    render() {
        return <div>
            <h1>{this.props.name}</h1>
            <p>{this.props.description}</p>
            {this.props.activities.length > 0 ?
                <ol>{this.props.activities.map((item, index) => {
                    return <li key={index}>{item}</li>
                })}</ol>
                : '目前没有特别推荐的活动'}
        </div>
    }
}

export default PlantInfo2